package org.darkforest.common.services;

import org.darkforest.enums.EmployeeLevel;

/**
 * EmployeeAssignmentService
 * Created by Justin on 15/5/27.
 */
public interface EmployeeAssignmentService {

    /**
     * assign a member to another member, as another member's sub node
     *
     * @param memberId member to be assigned
     * @param assignTo assign member to
     */
    void assign(Integer memberId, Integer assignTo);

    /**
     * assign a member to a  level 3 employee
     * according to current level 3 employee index
     *
     * @param memberId member to be assigned
     */
    void assign(Integer memberId);

    /**
     * assign a employee to employee level.
     * the level is 0 ~ 2
     * while set to 0, same as setAsRootEmployee
     * while set to 1 or 2, the method will automatic pick a root / level 1 employee, and assign this member to the node
     *
     * @param memberId      member id
     * @param employeeLevel level
     */
    void assignToLevel(Integer memberId, EmployeeLevel employeeLevel);

}
